<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8" isELIgnored="false"%>

<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta charset="utf-8">
<title></title>
<script type="text/javascript" src="js/safe/aywmq_qt.js"></script>
<script type="text/javascript" src="js/safe/da_opt.js"></script>
<meta name="keywords" content="">
<meta name="description" content="">
<script type="text/javascript" src="js/jquery-1.9.1.min.js"></script>
<link rel="stylesheet" href="css/safe/css.css" />
<link rel="stylesheet" href="css/safe/common.min.css" />
<link rel="stylesheet" href="css/safe/ms-style.min.css" />
<link rel="stylesheet" href="css/safe/personal_member.min.css" />
<link rel="stylesheet" href="css/safe/Snaddress.min.css" />
<link rel="stylesheet" href="css/zpwd/sui.css" />
<link rel="stylesheet" href="css/address.css" />
<script type="text/javascript" src="js/sui.js"></script>
<link rel="stylesheet"
	href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://cdn.bootcss.com/jquery/2.1.1/jquery.min.js"></script>
<script
	src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="js/index.js"></script>
</head>
<style>
a {
	color: #000000;
}

.sui-table th, .sui-table td {
	padding: 6px 8px;
	line-height: 18px;
	text-align: left;
	vertical-align: middle;
	border-top: 1px solid #e6e6e6;
	font-size: 14px;
	color: #333333;
}
</style>
<body class="ms-body">
	<div style="margin-top: 30px; width: 100%; margin: 0px 0 30px 10px;">
		<h3>
			<strong style="font-size: 30px;">收货地址</strong>
		</h3>
		<hr>

		<table class="sui-table table-bordered-simple"
			style="margin-top: 20px;">
			<thead>
				<tr>
					<th>编号</th>
					<th>收货人</th>
					<th>性别</th>
					<th>联系方式</th>
					<th>详细地址</th>
					<th>操作</th>
					<th></th>
				</tr>
			</thead>
			<tbody>
				<c:forEach items="${alist }" var="ads">
					<tr>
						<td>${ads.address_id }</td>
						<td>${ads.address_name }</td>
						<td>${ads.address_sex }</td>
						<td>${ads.address_phone }</td>
						<td>${ads.address_detail }</td>
						<td><button class="a btn btn-primary btn-lg"
								data-toggle="modal" data-target="#myModal_edit">修改</button>&nbsp;|&nbsp;
							<button class="del btn btn-primary btn-lg">删除</button></td>
						<td><c:if test="${ads.address_default!=false}">
								<span
									style="padding: 2px; font-family: 黑体; font-size: 15px; color: #777; border-radius: 2px; background-color: #ffae00;">默认地址</span>
							</c:if> <c:if test="${ads.address_default!=true}">
								<button class="default" style="border:none;color:#ffae00;font-weight: 900;">设为默认地址</button>
							</c:if></td>
					</tr>
				</c:forEach>
			</tbody>
		</table>

	</div>

	<!-- 	修改地址弹窗 -->
	<div class="modal fade" id="myModal_edit" tabindex="-1" role="dialog"
		aria-labelledby="myModalLabel" aria-hidden="true">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"
						aria-hidden="true">&times;</button>
					<h4 class="modal-title" id="myModalLabel">修改地址</h4>
				</div>
				<div class="modal-body">
					<form action="insertAddress.do" method="post">
						收货人姓名：<input type="text" id="ads_name" name="address_name" /><br>
						性别： <select style="padding: 5px; margin-left: 38px;" id="ads_sex">
							<option value="先生">先生</option>
							<option value="女士">女士</option>
						</select><br> 手机号：<input style="margin-left:28px;" type="text" id="ads_phone"
							name="address_phone" /> <br> 地址详情：<input style="margin-left:14px;" type="text"
							id="ads_detail" name="address_detail"> <br> <br>
					</form>
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
					<button type="button" class="b btn btn-primary">确认修改</button>
				</div>
			</div>
			<!-- /.modal-content -->
		</div>
		<!-- /.modal -->
	</div>

	<hr>
<div class="cont-main">
		<div class="main-wrap mt15">

			<div class="user-profile clearfix"
				style="margin-left: 0px; width: 100%; border: 0px;">
				<div class="user-profile-wrap" style="width: 100%; height: 500px;">
					<p style="margin-left: 70px; font-size: 14px;">
						<span style="color: #F88600; font-size: 14px;">新增收货地址</span><span
							style="margin-left: 10px; font-size: 14px; font-weight: bold;">&nbsp;&nbsp;带<span style="color: #F2873B;">*&nbsp;</span>号为必填项</span>
					</p>
					<div style="margin-left: 70px; margin-top: 30px; height: 30px;">
						<span style="color: #F2873B;">*&nbsp;</span><span class="titles">姓名:</span>
						<input type="text" id="address_name" placeholder="请填写收货人姓名"
							style="padding: 5px; width: 300px; margin-left: 35px;" /> <span
							class="titles">性别:</span> <select
							style="padding: 5px; margin-left: 14px;" id="address_sex">
							<option value="先生">先生</option>
							<option value="女士">女士</option>
						</select>
					</div>
					<div style="margin-left: 70px; margin-top: 50px;">
						<span style="color: #F2873B;">*&nbsp;</span><span class="titles">详细地址:</span>
					</div>
					<div style="margin-left: 150px; margin-top: -40px;">
						<textarea id="address_detail"
							style="width: 500px; height: 90px; padding: 5px;"
							placeholder="建议您如实填写详细收货地址，例如街道 名称，门牌号码，楼层和房间号等信息"></textarea>
					</div>
					<div style="margin-left: 80px; margin-top: 30px;">
					<span style="color: #F2873B;">*&nbsp;</span>
						<span class="titles">手机号码:</span> <select
							style="padding: 5px; margin-left: 14px;">
							<option>中国大陆+86</option>
						</select> <input type="text" id="address_phone" placeholder="填写收货人联系方式"
							style="padding: 5px; width: 200px;" />
					</div>
					<input type="hidden" value="${custom.c_id}" id="c_id"> <br>
					<button onclick="add_ads()"
						style="margin-left: 40%; margin-top: 10px; background-color: #F37B1D; color: #fff; width: 100px; height: 30px; border: 0px; border-radius: 5px;">确定</button>
				</div>

			</div>
		</div>
	</div>


	<style type="text/css">
.sui-table td {
	font-size: 14px;
}

.sui-table td {
	font-size: 12px;
}

.ng-footer {
	height: 130px;
	margin-top: 0;
}

.ng-s-footer {
	height: 130px;
	background: none;
	text-align: center;
}

.ng-s-footer p.ng-url-list {
	height: 25px;
	line-height: 25px;
}

.ng-s-footer p.ng-url-list a {
	color: #666666;
}

.ng-s-footer p.ng-url-list a:hover {
	color: #f60;
}

.ng-s-footer .ng-authentication {
	float: none;
	margin: 0 auto;
	height: 25px;
	width: 990px;
	margin-top: 5px;
}

.ng-s-footer p.ng-copyright {
	float: none;
	width: 100%;
}

.root1200 .ng-s-footer p.ng-copyright {
	width: 100%;
}
</style>
	<script type="text/javascript" src="js/safe/ms_common.min.js"></script>
</body>

</html>